package com.mzq.langchain4j_springboot.web.controller;

import com.mzq.langchain4j_springboot.config.AiConfig;
import com.mzq.langchain4j_springboot.web.entity.BusinessInspection;
import com.mzq.langchain4j_springboot.web.service.BusinessInspectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/system/businessInspection")
public class BusinessInspectionController {

    @Autowired
    private BusinessInspectionService businessInspectionService;

    @Autowired
    AiConfig.AssistantUnique assistantUnique;

    @PostMapping("/insertBusinessInspection")
    public ResponseEntity<Integer> insertBusinessInspection(BusinessInspection businessInspection) {
        return ResponseEntity.ok(businessInspectionService.insertBusinessInspection(businessInspection));
    }
    @PutMapping("/updateBusinessInspection")
    public ResponseEntity<Integer> updateBusinessInspection(BusinessInspection businessInspection) {
        return ResponseEntity.ok(businessInspectionService.updateBusinessInspection(businessInspection));
    }
}
